﻿<?xml version="1.0" encoding="utf-8" ?>
<easybus-config xmlns="http://www.workstation.co.jp/EasyBus-Configuration.xsd">
  
  <bus name="TestBus" nodeName="Server_A">
    <endpoint-setting>
      <endpoint name="RabbitMq" value="RabbitMq:HostName=localhost;Port=5672;VirtualHost=/;UserName=guest;Password=guest;QueueName=TestQueue;IsSynchronization=false"/>
      <endpoint name="Msmq" value="Msmq:Address=.\EasyBus.TestQueue;IsSynchronization=false"/>
      <endpoint name="ConfigMq" value="RabbitMq:HostName=localhost;Port=5672;VirtualHost=/;UserName=guest;Password=guest;QueueName=TestConfigQueue;IsSynchronization=false"/>
    </endpoint-setting>
  
    <publish-setting>
      <publish routeKey="EasyBus.TestPublish" description="测试发布消息"/>
    </publish-setting>

    <subscribe-setting>
      <subscribe name="EasyBus.UnitTest.SubscribeTestA" 
                 routeKey="EasyBus.TestPublish" 
                 busName="TestBus" 
                 endpointName="RabbitMq">
        <listener processThreadCount="3">
          <handle name="HandleA" />
          <handle name="HandleB"/>
        </listener>
      </subscribe>
      <subscribe name="EasyBus.UnitTest.SubscribeTestMsmqA" 
                 routeKey="EasyBus.TestPublish"
                 busName="TestBus"
                 endpointName="Msmq">
        <listener processThreadCount="1">
          <handle name="HandleA"/>
          <handle name="HandleB"/>
        </listener>
      </subscribe>
    </subscribe-setting>      
  </bus>
</easybus-config>

<!--<easybus-config>
  <endpoint-setting>
    <endpoint name="RabbitMq.TestQueue" value="RabbitMq:HostName=localhost;Port=5672;VirtualHost=/;UserName=guest;Password=guest;QueueName=TestQueue;IsSynchronization=false"></endpoint>
    <endpoint name="Msmq.TestQueue" value="Msmq:Address=.\EasyBus.TestQueue;IsSynchronization=false"></endpoint>
  </endpoint-setting>

  <publish-setting>
    <publish routeKey="EasyBus.TestPublish" description="测试发布"></publish>
  </publish-setting>

  <subscribe-setting>
    <subscribe name="EasyBus.UnitTest.SubscribeTestA" routeKey="EasyBus.TestPublish" busName="TestBus" endpointName="RabbitMq.TestQueue" description="测试订阅-RabbitMq">
      <listener processThreadCount="2" >
        <handleName name="HandleA" />
        <handleName name="HandleB" />
      </listener>
    </subscribe>
    <subscribe name="EasyBus.UnitTest.SubscribeTestB" routeKey="EasyBus.TestPublish" busName="TestBus" endpointName="Msmq.TestQueue" description="测试订阅-Msmq">
      <listener processThreadCount="2">
        <handleName name="HandleA" />
        <handleName name="HandleB" />
      </listener>
    </subscribe>
  </subscribe-setting>
</easybus-config>-->